export enum PageEnum {
  // 准备跳转到sso单点登录页面
  READY_SSO_LOGIN = "/readySsoLogin",
  // basic login path
  BASE_LOGIN = "/login",
  // basic home path
  BASE_HOME = "/home",
  // error page path
  ERROR_PAGE = "/exception",
  // error log page path
  ERROR_LOG_PAGE = "/error-log/list",
  // 第三方登录路由路径(回调)
  THIRD_LOGIN_PAGE_PATH = "/thirdAuth/login",

  // 主框架外的页面
  MAIN_OUT = "/main-out",

  // 配置中心
  CONFIG_CENTER = "/system/configCenter",
  // 邀请用户加入企业链接
  INVITE_USER_JOIN_TENANT = "/account/invite",
  // 权限申请页面
  PERM_APPROVAL_APPLY = "/system/permApproval/apply",
  OAUTH_CALLBACK = "/oauth/callback",
}

export const loginPages: PageEnum[] = [PageEnum.BASE_LOGIN, PageEnum.READY_SSO_LOGIN, PageEnum.THIRD_LOGIN_PAGE_PATH]
export const isLoginPage = (): boolean => loginPages.filter((e) => window.location.pathname.startsWith(e))?.length > 0
